package com.atguigu.e_reflect.method;

public class Student {

    //成员方法
    public void sleep(){
        System.out.println("sleep方法执行了!");
    }

    protected void eat(String food){
        System.out.println("eat方法执行了 ! " + food);
    }

    String study(){
        System.out.println("study方法执行了 ! ");
        return "好好学习,天天向上";
    }

    private String playGame(String name,int hour){
        System.out.println("playGame方法执行了 ! ");
        return "小明玩 " + name + " 玩了 " + hour + " 小时! ";
    }
}
